/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nms.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author mohamedemara
 */
@Entity
@Table(name = "ISP")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Isp.findAll", query = "SELECT i FROM Isp i"),
    @NamedQuery(name = "Isp.findByIspId", query = "SELECT i FROM Isp i WHERE i.ispId = :ispId"),
    @NamedQuery(name = "Isp.findByIspArabicname", query = "SELECT i FROM Isp i WHERE i.ispArabicname = :ispArabicname"),
    @NamedQuery(name = "Isp.findByIspEnglishname", query = "SELECT i FROM Isp i WHERE i.ispEnglishname = :ispEnglishname"),
    @NamedQuery(name = "Isp.findByIspAddress", query = "SELECT i FROM Isp i WHERE i.ispAddress = :ispAddress")})
public class Isp implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "isp_id")
    private String ispId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "isp_arabicname")
    private String ispArabicname;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "isp_englishname")
    private String ispEnglishname;
    @Size(max = 150)
    @Column(name = "isp_address")
    private String ispAddress;

    public Isp() {
    }

    public Isp(String ispId) {
        this.ispId = ispId;
    }

    public Isp(String ispId, String ispArabicname, String ispEnglishname) {
        this.ispId = ispId;
        this.ispArabicname = ispArabicname;
        this.ispEnglishname = ispEnglishname;
    }

    public String getIspId() {
        return ispId;
    }

    public void setIspId(String ispId) {
        this.ispId = ispId;
    }

    public String getIspArabicname() {
        return ispArabicname;
    }

    public void setIspArabicname(String ispArabicname) {
        this.ispArabicname = ispArabicname;
    }

    public String getIspEnglishname() {
        return ispEnglishname;
    }

    public void setIspEnglishname(String ispEnglishname) {
        this.ispEnglishname = ispEnglishname;
    }

    public String getIspAddress() {
        return ispAddress;
    }

    public void setIspAddress(String ispAddress) {
        this.ispAddress = ispAddress;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ispId != null ? ispId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Isp)) {
            return false;
        }
        Isp other = (Isp) object;
        if ((this.ispId == null && other.ispId != null) || (this.ispId != null && !this.ispId.equals(other.ispId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.nms.entities.Isp[ ispId=" + ispId + " ]";
    }
    
}
